package my.mark.mybaibaoxiang.juc.biji08.map.Test;

/**
 * @author wxming.
 * @description:
 */
public class Key {

    private final int value;

    Key(int value) {
        this.value = value;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass())
            return false;
        Key key = (Key) o;
        return value == key.value;
    }

    @Override
    public int hashCode() {
        return this.value;
    }

    /*@Override
    public int compareTo(Key o) {
        int x = this.value , y = o.value;
        return (x < y) ? -1 : ((x == y) ? 0 : 1);
    }*/
}